bool connected;
bool in_channel;
bool logged_in;

char *channel_name;
char *channel_rule;
char *character_clan_name;
char *character_name;
char *ini_contents;
char *server_ip;
char *server_name;
char *server_password;
char server_type;
char *server_username;

CRITICAL_SECTION cs;

int channel_type;
int md5_size;

unsigned char character_face;
unsigned char character_hair;
unsigned char character_index;
unsigned char character_level;
unsigned char character_sex;
unsigned char player_pgrade;
unsigned char player_ugrade;
unsigned int character_bp;
unsigned int character_clan_grade;
unsigned int character_xp;
unsigned long channel_id;
unsigned long player_id;
unsigned short character_max_ap;
unsigned short character_max_hp;
unsigned short server_port;

struct GunZPacketDataHeader
{
	unsigned short size;
	unsigned short command_id;
	unsigned char packet_id;
};

struct GunZPacketHeader
{
	unsigned short type;
	unsigned short size;
	unsigned short checksum;
};

TCPSocket *match_socket;

unsigned char *key_xchg;
unsigned char packet_id;
unsigned char *server_md5;
unsigned long long server_checksum;